/*******************************************************************************
  * Copyright(c) 2023 Levetop Semiconductor Co.,Led. All rights reserved.
  * @file     circularTouch.h
  * @author   UartTFT Application Team
  * @version  V0.0.1
  * @date     2023-01-04
  * @brief    This file contains the functions prototypes for the UartTFT
  *           Application display firmware.
 ********************************************************************************/

#ifndef CIRCULARTOUCH_H_
#define CIRCULARTOUCH_H_

#include "data.h"

/*ring progress bar with touch*/
typedef struct
{
	uint16_t Code;	// Function code
	uint8_t len;	// lenght
	uint16_t p_add; // variable pointer
	uint16_t x;		// Upper left corner coordinate
	uint16_t y;
	uint16_t frontID; // foreground picture ID
	uint16_t bgID;	  // background picture ID
	uint16_t arrowid; // touch icon id
	uint16_t Sld_R;	  // sliding radius
	uint8_t tp_R;	  // touch radius
	int16_t Vmin;
	int16_t Vmax;
	uint16_t Sangle;
	uint16_t Eangle;
	uint16_t dx;
	uint16_t dy;
	uint8_t I_num;
	uint8_t D_num;
	uint8_t Alig;
	uint8_t zk_id;
	uint32_t color;
	uint16_t s_id;
	uint16_t e_id;
	uint8_t flag;

	uint16_t w1;
	uint16_t h1;
	uint8_t rm1;
	uint16_t x2;
	uint16_t y2;
	uint16_t w2;
	uint16_t h2;
	uint8_t rm2;
	uint16_t xR;
	uint16_t yR;

	uint8_t enable_touch;
	uint16_t overlay;

} RingSld_Info;

extern RingSld_Info gRingSld_Info[RINGSLD_SIZE];
extern uint8_t RingSld_count;
extern uint8_t RingSld_firsttouch;
extern uint8_t RingSld_firstnum;
/********/

/*ring progress bar with touch*/
extern void DL_RingSld(uint8_t num);
extern void RingSld_Display(uint8_t num, uint16_t angle);
extern void RingSld_touch(void);

#endif /* CIRCULARTOUCH_H_ */
